/*
 * This file is part of aion-engine <aion-engine.com>
 *
 * aion-engine is private software: you can redistribute it and or modify
 * it under the terms of the GNU Lesser Public License as published by
 * the Private Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * aion-engine is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser Public License for more details.
 *
 * You should have received a copy of the GNU Lesser Public License
 * along with aion-engine.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.aionengine.gameserver.model.templates.serial_killer;

import javax.xml.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;

/**
 * @author Dtem
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RankRestriction", propOrder = {
        "penaltyAttr"
})
public class RankRestriction {

    @XmlElement(name = "penalty_attr")
    protected List<RankPenaltyAttr> penaltyAttr;
    @XmlAttribute(name = "rank_num", required = true)
    protected int rankNum;
    @XmlAttribute(name = "restrict_direct_portal", required = true)
    protected boolean restrictDirectPortal;
    @XmlAttribute(name = "restrict_dynamic_bindstone", required = true)
    protected boolean restrictDynamicBindstone;


    /**
     * @return the restrictDirectPortal
     */
    public boolean isRestrictDirectPortal() {
        return restrictDirectPortal;
    }


    /**
     * @param restrictDirectPortal the restrictDirectPortal to set
     */
    public void setRestrictDirectPortal(boolean restrictDirectPortal) {
        this.restrictDirectPortal = restrictDirectPortal;
    }


    /**
     * @return the restrictDynamicBindstone
     */
    public boolean isRestrictDynamicBindstone() {
        return restrictDynamicBindstone;
    }


    /**
     * @param restrictDynamicBindstone the restrictDynamicBindstone to set
     */
    public void setRestrictDynamicBindstone(boolean restrictDynamicBindstone) {
        this.restrictDynamicBindstone = restrictDynamicBindstone;
    }


    public List<RankPenaltyAttr> getPenaltyAttr() {
        if (penaltyAttr == null) {
            penaltyAttr = new ArrayList<RankPenaltyAttr>();
        }
        return this.penaltyAttr;
    }


    public int getRankNum() {
        return rankNum;
    }

    public void setRankNum(int value) {
        this.rankNum = value;
    }

}
